def count_characters(input_str):
    """统计字符串中字母和数字的出现次数"""
    char_count = {}
    for char in input_str:
        if char.isalnum():  # 只统计字母和数字
            char_count[char] = char_count.get(char, 0) + 1
    return char_count

# 主程序
user_input = input().strip()  # 读取用户输入，去除首尾空白字符
result = count_characters(user_input)
print(result)